<template>
	<view v-show="is_show" class="box-fixed">
		<view class="box-icon" @click="back_top">
			<uni-icons type="arrow-up" class="deep-color deep-size3"></uni-icons>
		</view>
		<view class="box-icon" @click="update_colunms">
			<uni-icons type="loop" class="deep-color deep-size3"></uni-icons>
		</view>
	</view>
</template>

<script setup>
import { defineEmits, ref } from 'vue'
import { onPageScroll } from '@dcloudio/uni-app'

const is_show = ref(false)

onPageScroll((e) => {
	is_show.value = e.scrollTop > 400 ? true : false
})

const back_top = function () {
	uni.pageScrollTo({
		scrollTop: 0
	})
}
const update_colunms = function () {
	back_top()
	// emit('api_get_image_data_by_category')
}
</script>

<style scoped lang="scss"></style>

<style lang="scss" scoped>
.box-fixed {
	position: fixed;
	z-index: 99999999999;
	right: 10rpx;
	bottom: 15vh;

	.box-icon {
		margin-top: 25rpx;
		width: 80rpx;
		height: 80rpx;
		border: 1px solid white;
		background-color: rgba(255, 255, 255, 0.3);
		backdrop-filter: blur(20rpx);
		// background-color: red;
		border-radius: 50%;
		@extend .f-c-c-n;
	}
}
</style>
